<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        var source= new EventSource('/sse/get_data?id=xx');
        source.onmessage = function (event) {
            console.info(event.data);
            document.getElementById('result').innerText = event.data;
        }
    </script>
</head>
<body>
<div id="result"></div>
</body>
</html>